﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Pibby.Core;

namespace Pibby.UI
{
	public partial class RemovePodcastForm : Form
	{
		public RemovePodcastForm()
		{
			InitializeComponent();
		}

		private void RemovePodcastForm_Load(object sender, EventArgs e)
		{
			if (this.Podcast != null)
			{
				this.podcastNameLabel.Text = this.Podcast;

				using (System.IO.Stream s = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Pibby.Images.podcast.png"))
				{
					this.pictureBox1.Image = Bitmap.FromStream(s);
				}
			}
		}

		public string Podcast
		{
			get;
			set;
		}

		public bool DeleteEpisodes
		{
			get;
			private set;
		}

		private void removeButton_Click(object sender, EventArgs e)
		{
			this.DeleteEpisodes = this.deleteEpisodesCheckBox.Checked;

			this.DialogResult = DialogResult.OK;
			this.Close();
		}

		private void cancelButton_Click(object sender, EventArgs e)
		{
			this.DialogResult = DialogResult.Cancel;
			this.Close();
		}
	}
}
